# import pymysql
# #增加 删除 修改
# conn=pymysql.connect(host='127.0.0.1',user='root',password='FW249746',database='homework')
#
# cur=conn.cursor(cursor=pymysql.cursors.DictCursor)#返回字典
# try:
#     # cur.execute('update student set sname="AKW" where sid=17;')
#     cur.execute('insert into student values(17,"男",3,"AK")')
#
#     conn.commit()
# except Exception as e:
#     print(e)
#     conn.rollback()#回滚
# cur.close()
# conn.close()


import pymysql
conn=pymysql.connect(host='127.0.0.1',user='root',password='FW249746',database='homework')
cur=conn.cursor(cursors=pymysql.cursors.DictCursor)
try:
    cur.execute('')
    conn.commit()
except Exception as e:
    print(e)
    conn.rollback()
cur.close()
conn.close()







